package org.nvm.lucene;

import java.io.Reader;

import org.apache.lucene.analysis.Analyzer;

public final class NVMAnalyzer extends Analyzer {
	
	private boolean useSmart = false;
	
	public boolean isUseSmart() {
		return useSmart;
	}

	public void setUseSmart(boolean useSmart) {
		this.useSmart = useSmart;
	}

	public NVMAnalyzer() {
	}

	public NVMAnalyzer(boolean smart) {
		this.useSmart = smart;
	}
	
	@Override
	protected TokenStreamComponents createComponents(String arg0, final Reader input) {
		return new TokenStreamComponents(new NVMTokenizer(input, this.useSmart));
	}

}
